<template>
  <div class="slider_wrapper">
    <van-swipe :autoplay="3000">
      <van-swipe-item v-for="{pic} in banner" :key="pic">
        <img v-lazy="pic" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import Vue from 'vue';
import { Swipe, SwipeItem,Lazyload } from 'vant';
import {getHotSound} from '../api/index';

Vue.use(Swipe).use(SwipeItem);
Vue.use(Lazyload);
export default {
  data:function(){
    return {
      banner:[]
    }
  },
async mounted(){
    // this.$store.dispatch("getSoundList");
    const {info} = await getHotSound();
    const {banner} = info;
    this.banner = banner;
    // console.log(this.banner)
  }
}
</script>

<style lang="scss">
  .slider_wrapper{
    width: 100%;
    height:1.25rem;
    img{
      width: 100%;
      height:100%;
    }
  }
</style>